package com.yzy.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@TableName("t_order")
public class Order extends Model<Order> {

    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    @TableField("upload_user_id")
    private Integer uploadUserId;

    @TableField("download_user_id")
    private Integer downloadUserId;

    @TableField("goods_id")
    private Integer goodsId;

    @TableField("payment")
    private Double payment;

    @TableField("buy_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date buyTime;

    @TableField("status")
    private Integer status;
}
